class Personale::TagliePersonaleController < DefaultController
  require_role self.parent_name.underscore
  active_scaffold :taglie_personale do |config|
    config.label = Application.controller_label(self)
    config.subform.layout = :vertical
    list.sorting = {:personale => 'ASC'}
    config.actions.add :config_list, :export, :field_search
    
    columns = [ :personale, :scarpe, :tshirt, :pantaloni, :felpa, :camicia, :giacca, :guanti ]
    config.columns = columns
    
    columns.each { |i| config.columns[i].inplace_edit = :ajax }
    config.columns[:personale].inplace_edit = false
    config.columns[:personale].form_ui = :select
    config.columns[:personale].sort_by :sql => 'personale.cognome'
    config.columns[:personale].set_link('show', :controller => 'anagrafiche/personale')
  end
end
